<script setup lang="js">
import { ref } from 'vue';

import { getStorage } from '../utils/storage';
import TypeManager from '../components/TagsManager.vue';

let ollamaAddress = ref('');

getStorage('ollamaAddress').then((value) => {
  ollamaAddress.value = value;
});


let tabsInfo = ref([]);
async function getTabsInfo() {    
  const res = await chrome.tabs.query({currentWindow: true});
  console.log(res);
  

  const titleList = res.map(element => element.title);
  console.log(titleList);
  
  
}

const openOptions = () => {
  window.open(chrome.runtime.getURL('options.html'));
}
</script>

<template>
  <!-- tailwind 宽度四百 -->
  <main class="w-max bg-white p-6 rounded-lg shadow-lg">
    
    <TypeManager />

    <div>
      <button class="bg-gray-400 mt-4 text-white py-2 px-4 rounded" @click="openOptions">
        配置Ollama本地服务
      </button>
    </div>
  </main>

</template>
<style>
@tailwind base;
@tailwind components;
@tailwind utilities;
</style>
